package thread;

public class CurrentThreadDemo {
    public static void main(String[] args) {
        /**
         * static Thread currentThread
         * 获取运行这个方法的线程
         */
        Thread thread = Thread.currentThread();
        System.out.println("主线程" + thread);
        dosome();
    }
    public static void dosome(){
        Thread t = Thread.currentThread();
        System.out.println("执行dosome方法的线程是：" + t);
    }
 }

